
/**
 * 通用 api 服务
 * @param   { Function }
 * */
const apiService = (fn) => {
  return new Promise((resolve, reject) => {
    fn.then(response => {
      resolve(response);
    }).catch(error => {
      reject(error);
    });
  });
}


export { apiService };
